package jude.java.money.sly;

import jude.java.money.beans.SlySite;
import jude.java.money.beans.global.Domain;

public class Normalizer {
	
	public Normalizer() {
	}

	public boolean normalize(SlySite site) {
		if (site == null)
			return false;
		boolean b = false;
		if (site.getDomain() == null) {
			Domain d = new Domain(site.getUrl());
			site.setDomain(d.getDomain());
			b = true;
		}
		if (site.getIp() == null) {
			site.setIp(Domain.getDomainIP(site.getDomain()));
			b = true;
		}
		return b;
	}
}
